package com.zh.webflux.log;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebFilterChain;
import reactor.core.publisher.Mono;

/**
 * 对请求接口的日志记录
 *
 * @author Zhou
 * @date 14:30 2022/12/20
 */
@Slf4j
//@Component
public class RequestLogFilter implements WebFilter {

    @Override
    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
        System.out.println("正在通过RequestLogFilter... ");

        return chain.filter(exchange);
    }

}
